package org.xteam.sled.semantic;

import java.util.Map;

import org.xteam.parser.runtime.Span;


public class ConstructorContext extends ForwardingEvaluationContext {

	private Map<String, IDenotable> rho;

	public ConstructorContext(SemanticContext context,
			Map<String, IDenotable> rho) {
		super(context);
		this.rho = rho;
	}

	@Override
	public IDenotable lookup(String name, Span span) {
		if (rho.containsKey(name))
			return rho.get(name);
		return context.lookup(name, span);
	}

}
